<?php
require_once("../login/class.session.php");
require_once("../functions.php");
if (!isset($session->logged_in) || !$session->logged_in) {
  header("Location: ../createaccount.php");
}
$userinfo = $session->userinfo;
?>

<div class = "bigbox">
<form id = "editprofile" method="post" action="../process.php">
  <table>		
    <h3>Edit <span class = "username"><?=$userinfo['username']?></span>'s Profile</h3>
		<tr>
      <td>Username: </td> <td><?= $userinfo['username'] ?></td>
		</tr>
		<tr>
			<td>Display Name:</td><td>
				<input name="displayname" type="text" value = "<?=$userinfo['displayname'];?>" />
			</td>
		</tr>
		<tr>
			<td>Email:</td><td><input name="email" type="text" value = "<?=$userinfo['email'];?>" /></td>
		</tr>
		<tr>
			<td>Website:</td><td><input name="website" type="text" value = "<?=$userinfo['website']?>" /></td>
		</tr>
		<tr>
			<td>City:</td><td><input name="city" type="text" value = "<?=$userinfo['city']?>"/></td>
		</tr>
		<tr>
    <td>State/Province:</td><td><? echo state_selection($userinfo['state']); ?></td>
		</tr>
		<tr>
    <td>Country:</td><td><?echo country_selection($userinfo['country']); ?></td>
		</tr>
		<tr>
      <td>Members:</td><td><textarea name="members" type="text"><?=$userinfo['members']?></textarea></td>
		</tr>
		<tr>
			<td>Genre:</td><td><input name="genre" type="text" value = "<?=$userinfo['genre']?>" /></td>
		</tr>
		<tr>
			<td>Record Label:</td><td><input name="recordlabel" type="text" value = "<?=$userinfo['recordlabel']?>" /></td>
		</tr>
		<tr>
      <td>Bio:</td><td><textarea name="bio" type="text"><?=$userinfo['bio']?></textarea></td>
		</tr>
		<tr>
			<td>Influences:</td><td><input name="influences" type="text" value = "<?=$userinfo['influences']?>" /></td>
		</tr>
		<tr>
			<td>Sounds Like:</td><td><input name="soundslike" type="text" value = "<?=$userinfo['soundslike']?>" /></td>
		</tr>
		<tr>	
			<td></td><td><input class = "small color_button blue" type="submit" id="pass_submit" value="Edit" /></td>
      <input type="hidden" name="subedit" value="1">
    </form>
  </tr>
  <tr>
    <td></td><td><form action="viewprofile.php">
    <input class = "small color_button blue" type="submit" id="pass_submit" value="Cancel" />
  </form></td>
				  
        </tr>    
  
</table>
</div>

